package com.nondo.rdp.finance.model.analysis;

import com.nondo.rdp.core.domain.attach.Attach;
import com.nondo.rdp.auth.model.UserBeanInner;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 金融圈-分析
 */
public class AdminAnalysisBean {

    private Long id;    //自增ID
    private String title;   //标题
    private String body;    //内容
    private UserBeanInner user;      //用户信息
    private int type;  //所属类型，0=大咖分析，1=个股分析，2=投资策略
    private Attach mainImg;//封面图片
    private Long readNum;// 阅读量
    private Long upNum;//点赞数
    private Long complaintNum;//投诉次数
    private Long commentNum; //评论数量
    private Date createDate;// 创建日期
    private String createdDateString; //格式化后的日期
    private Map extra; //扩展字段，展示列表的时候使用

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @NotNull(message = "标题不能为空")
    @Length(min = 1, max = 32, message = "标题长度不能超过32个字符")
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @NotNull(message = "内容不能为空")
    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public UserBeanInner getUser() {
        return user;
    }

    public void setUser(UserBeanInner user) {
        this.user = user;
    }

    @NotNull(message = "类型不能为空")
    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public Attach getMainImg() {
        return mainImg;
    }

    public void setMainImg(Attach mainImg) {
        this.mainImg = mainImg;
    }

    public Long getReadNum() {
        return readNum;
    }

    public void setReadNum(Long readNum) {
        this.readNum = readNum;
    }

    public Long getUpNum() {
        return upNum;
    }

    public void setUpNum(Long upNum) {
        this.upNum = upNum;
    }

    public Long getComplaintNum() {
        return complaintNum;
    }

    public void setComplaintNum(Long complaintNum) {
        this.complaintNum = complaintNum;
    }

    public Long getCommentNum() {
        return commentNum;
    }

    public void setCommentNum(Long commentNum) {
        this.commentNum = commentNum;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getCreatedDateString() {
        return createdDateString;
    }

    public void setCreatedDateString(String createdDateString) {
        this.createdDateString = createdDateString;
    }

    public Map getExtra() {
        return extra;
    }

    public void setExtra(Map extra) {
        this.extra = extra;
    }

    public void setExtra(String extra) {
        this.extra = new HashMap();
    }
}
